<?php

return array(
	'class' => 'application.components.MCDbConnection',
	'db_config' => array(
		'default' => array(
			array(
				'connectionString' => 'mysql:host='. $_SERVER['DB_HOST'] .';dbname=kaipainet',
				'emulatePrepare' => true,
				'username' => $_SERVER['DB_USER'],
				'password' => $_SERVER['DB_PASS'],
				'charset' => 'utf8',
				'autoConnect' => true,
				'tablePrefix' => '',
				'schemaCacheID' => false,
				//缓存表结构(需要开启cache)，Active Record 依靠表的元数据（metadata）测定列的信息，读取元数据并解析需要时间
				'schemaCachingDuration' => 3600,
				//记录绑定参数的值，调试时使用
				'enableParamLogging' => YII_DEBUG,
				'enableProfiling' => YII_DEBUG,
				//查询缓存时间
				//'queryCachingDuration' => 6,
				//查询数量
				//'queryCachingCount' => 1
			)
		),
		'write' => array(
			array(
				'connectionString' => 'mysql:host='. $_SERVER['DB_HOST'] .';dbname=kaipainet',
				'emulatePrepare' => true,
				'username' => $_SERVER['DB_USER'],
				'password' => $_SERVER['DB_PASS'],
				'charset' => 'utf8',
				'autoConnect' => true,
				'tablePrefix' => '',
				'schemaCacheID' => false,
				//缓存表结构(需要开启cache)，Active Record 依靠表的元数据（metadata）测定列的信息，读取元数据并解析需要时间
				'schemaCachingDuration' => 3600,
				//记录绑定参数的值，调试时使用
				'enableParamLogging' => YII_DEBUG,
				'enableProfiling' => YII_DEBUG,
				//查询缓存时间
				//'queryCachingDuration' => 6,
				//查询数量
				//'queryCachingCount' => 1
			)
		),
		'read' => array(
			array(
				'connectionString' => 'mysql:host='. $_SERVER['DB_HOST'] .';dbname=kaipainet',
				'emulatePrepare' => true,
				'username' => $_SERVER['DB_USER'],
				'password' => $_SERVER['DB_PASS'],
				'charset' => 'utf8',
				'autoConnect' => true,
				'tablePrefix' => '',
				'schemaCacheID' => false,
				//缓存表结构(需要开启cache)，Active Record 依靠表的元数据（metadata）测定列的信息，读取元数据并解析需要时间
				'schemaCachingDuration' => 3600,
				//记录绑定参数的值，调试时使用
				'enableParamLogging' => YII_DEBUG,
				'enableProfiling' => YII_DEBUG,
				//查询缓存时间
				//'queryCachingDuration' => 6,
				//查询数量
				//'queryCachingCount' => 1
			),
			array(
				'connectionString' => 'mysql:host='. $_SERVER['DB_HOST'] .';dbname=kaipainet',
				'emulatePrepare' => true,
				'username' => $_SERVER['DB_USER'],
				'password' => $_SERVER['DB_PASS'],
				'charset' => 'utf8',
				'autoConnect' => true,
				'tablePrefix' => '',
				'schemaCacheID' => false,
				//缓存表结构(需要开启cache)，Active Record 依靠表的元数据（metadata）测定列的信息，读取元数据并解析需要时间
				'schemaCachingDuration' => 3600,
				//记录绑定参数的值，调试时使用
				'enableParamLogging' => YII_DEBUG,
				'enableProfiling' => YII_DEBUG,
				//查询缓存时间
				//'queryCachingDuration' => 6,
				//查询数量
				//'queryCachingCount' => 1
			)
		),
	)
);
